FROM python:3.9.2
WORKDIR /luck-ai-code-review
COPY . /luck-ai-code-review
RUN pip3 install -r /luck-ai-code-review/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple --target=/usr/local/lib/python3.9/site-packages --upgrade
RUN Restart=always

# 设置容器端口号
EXPOSE 5007

# 设置环境变量
ENV SERVER_PORT 5007
ENV BASIC_AUTH1 "admin"
ENV BASIC_AUTH2 "luckserver"

ENV AGENT_ID 3037440410
ENV APP_KEY "dinglci1fsvrlaycqn59"
ENV APP_SECRET "cqwdwlssBje2CpPCUQVEYt87B31ayajK8YvVTCQLtILsU-t1NOU_r9qAwqwMudnT"
ENV DINGTALK_APP_KEY "KEY_8dcf71e1-4821-475c-8263-f64468ae393a"
ENV DINGTALK_APP_SECRET "SECRET_8fa4454f-6e77-4c8f-8fc0-212cb3b3942c"
ENV DINGTALK_URL "http://10.10.10.166:30881"
ENV DINGTALK_URL_BASIC_AUTH1 "admin"
ENV DINGTALK_URL_BASIC_AUTH2 "luckserver"

ENV LOG_APP_KEY "KEY_8dcf71e1-4821-475c-8263-f64468ae393a"
ENV LOG_APP_SECRET "SECRET_8fa4454f-6e77-4c8f-8fc0-212cb3b3942c"
ENV LOG_URL "http://10.10.10.166:30753"
ENV LOG_URL_BASIC_AUTH1 "admin"
ENV LOG_URL_BASIC_AUTH2 "luckserver"

ENV DB_TYPE "mysql"
ENV DB_HOST "10.10.10.231"
ENV DB_PORT 3306
ENV DB_NAME "zentaopro"
ENV DB_USER "root"
ENV DB_PASSWORD "123456"

ENV GITLAB_PRIVATE_TOKEN "-sqvLoLAgfWHQ8NSQcqr"
ENV GITLAB_SERVER_URL "http://10.10.10.51"

ENV TZ "Asia/Shanghai"

# 启动服务
CMD ["python3", "/luck-ai-code-review/start.py"]